package com.annhoa.ribbon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author annhoa
 * @Date 2019/3/18 11 04
 * @Description
 */
@RestController
public class RibbonController {
    @Autowired
    private OfferServeRibbon offerServeFeign;

    @RequestMapping(value = "/index1", method = RequestMethod.GET)
    public String index1() {
        System.out.println("请求ribbon index1 FeignClient 负载代理");
        return offerServeFeign.text1();
    }

    @RequestMapping(value = "/index2", method = RequestMethod.GET)
    public String index2(){
        System.out.println("请求ribbon index2 FeignClient 负载代理");
        return offerServeFeign.text2();
    }

}
